package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IOtherFragmentModel;
import com.wgts.wgts.mvp.model.imp.OtherFragmentModel;
import com.wgts.wgts.mvp.presenter.IOtherFragmentPresenter;
import com.wgts.wgts.mvp.presenter.imp.OtherFragmentPresenter;
import com.wgts.wgts.mvp.view.IOtherFragmentView;
import com.wgts.wgts.netmodle.NetService;

import javax.inject.Inject;

import dagger.Module;
import dagger.Provides;

@Module
public class OtherFragmentModule {

    private IOtherFragmentView view;

    public OtherFragmentModule(IOtherFragmentView view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public IOtherFragmentView provideView(){
        return view;
    }

    @FragmentScope
    @Provides
    public IOtherFragmentModel provideModel(NetService netService){
        return new OtherFragmentModel(netService);
    }

    @FragmentScope
    @Provides
    public IOtherFragmentPresenter providePersenter(IOtherFragmentView view, IOtherFragmentModel model){
        return new OtherFragmentPresenter(model, view);
    }

}
